import App from 'constants/action';
import { CALL_BOOK_API } from '../middlewares';

/**
 * 查询登陆用户profile
 */
export function fetchUserInfo() {
  return {
    type: 'fetchMySelfProfile',
    [CALL_BOOK_API]: {
      types: [App.FETCH_USERINFO, App.FETCH_USERINFO_SUCCESS, App.FETCH_USERINFO_FAIL],
      uri: '/admin-api/a/users/profile',
      method: 'GET',
    },
  };
}
